package cn.gson.crm.model.mapper;

import cn.gson.crm.model.pojos.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface OrderMapper {
    //查询负责人下所有合同
    public List<Order> selectorder(Integer cid);
    //新增审批人下拉框
    public List<Employee> selectsp(@Param("dept") String dept);
    public List<Employee> selectLB();
    //查询当前登录人对应合同
    public List<Contract> selectcontract(Integer oid);
    //根据合同id查询报价产品
    public List<Sales> selectbaojia(@Param("cid") Integer cid);
    //条件查询订单状态
    public List<Order> selectstate(@Param("cid") Integer cid,@Param("state") String state);
    //根据合同编号和订单号查询订单
    public List<Order> selectwhere(@Param("cid") Integer cid,@Param("ocnumber") String ocnumber);
    //高级查询
    public List<Order> selectgaoji(@Param("cid") Integer cid, @Param("onumber") String onumber, @Param("cnumber") String cnumber, @Param("condition6")String condition6,@Param("ecstate") String ecstate);

    //根据id查询订单详情
    public List<OrderDetails> selectoid(Integer oid);
    //主页查询所有
    public List<Order> selectOver();
    //主页查询总订单金额
    public List<Order> selectMoney();

    public List<Order> selectnian(@Param("cid") Integer cid,@Param("nian") String nian);
}
